package com.invoicerecognition.backend.controller.Invoice;

import com.alibaba.fastjson.JSONObject;
import com.invoicerecognition.backend.service.Invoice.GetInvoiceRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class GetInvoiceRecordController {

    @Autowired
    private GetInvoiceRecordService getInvoiceRecordService;

    @GetMapping("/api/invoice/record")
    public JSONObject getRecord(@RequestParam int page) {
        return getInvoiceRecordService.getRecord(page);
    }
}
